package tpo.wmb.consumer.service.impl;

import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;
import pojo.Area;
import pojo.User;
import pojo.Useraddress;
import tpo.wmb.consumer.client.User_FeignClient;
import tpo.wmb.consumer.service.UserService;


import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class UserServiceImpl  implements UserService {

    @Resource
    private User_FeignClient client;

    @Override
    public PageInfo<User> selectUserList(Map<String, Object> map) {

        return client.selectUserList(map);
    }

    @Override
    public List<User> selectUsers() {
        return client.selectUsers();
    }

    @Override
    public List<Integer> selectUserListInt(String name) {
        return client.selectUserListInt(name);
    }

    @Override
    public User selectUser(Integer id) {
        return client.selectUser(id);
    }

    @Override
    public Integer insertUser(User user) {
        return client.insertUser(user);
    }

    @Override
    public Integer updateUser(User user) {
        return client.updateUser(user);
    }

    @Override
    public Integer deleteUser(Integer id) {
        return client.deleteUser(id);
    }

    @Override
    public List<Useraddress> selectAddressList(Integer uid) {
        return client.selectAddressList(uid);
    }


    @Override
    public Useraddress selectAddress(Integer id) {
        return client.selectAddress(id);
    }

    @Override
    public Integer insertAddress(Useraddress useraddress) {
        return client.insertAddress(useraddress);
    }

    @Override
    public Integer updateAddress(Useraddress useraddress) {
        return client.updateAddress(useraddress);
    }

    @Override
    public Integer deleteAddress(Integer id) {
        return client.deleteAddress(id);
    }

    @Override
    public Useraddress selectDefalutAddress(Integer uid) {
        return client.selectDefalutAddress(uid);
    }

    @Override
    public List<Area> selectUserArea(Integer upperLevelID) {
        return client.selectUserArea(upperLevelID);
    }
}
